package com.linran.lin.utils;//

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.linran.lin.bo.ExcelBO;
import lombok.extern.slf4j.Slf4j;

/**
 * @date 2025/5/6 18:24
 * @description
 */
@Slf4j
public class ExcelListener extends AnalysisEventListener<ExcelBO> {
    @Override
    public void invoke(ExcelBO excelBO, AnalysisContext analysisContext) {
        log.info("解析到一条数据: {}", excelBO.toString());
        // 这里可以处理业务逻辑，如保存到数据库
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        log.info("所有数据解析完成！");
    }
}
